package com.eastfair.venueservice.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.eastfair.boot.request.PageParams;
import com.eastfair.boot.service.SuperService;
import com.eastfair.venueservice.dto.HomeBuilderDrawingAuditDTO;
import com.eastfair.venueservice.dto.HomeBuilderDrawingCategoryAuditDTO;
import com.eastfair.venueservice.dto.VenueDrawingCategoryAuditDTO;
import com.eastfair.venueservice.entity.HomeBuilderDrawingCategoryAudit;
import com.eastfair.venueservice.enumeration.HomeBuilderDrawingCategoryAuditDrawingSourceEnum;
import com.eastfair.venueservice.vo.HomeBuilderDrawingCategoryAuditVO;

import java.util.List;

/**
 * <p>
 * 业务接口
 * 主场搭建商图纸分类审核记录
 * </p>
 *
 * @author dqq
 * @date 2023 -04-28
 */
public interface HomeBuilderDrawingCategoryAuditService extends SuperService<HomeBuilderDrawingCategoryAudit> {

    /**
     * 分页查询图纸分类审核列表VO.
     *
     * @param pageParams the page params
     * @return the page
     */
    Page<HomeBuilderDrawingCategoryAuditVO> listCategoryAuditVO(PageParams<HomeBuilderDrawingCategoryAuditDTO> pageParams);

    /**
     * 查询图纸分类审核列表.
     *
     * @param query the query
     * @return the list
     */
    List<HomeBuilderDrawingCategoryAudit> listHomeBuilderDrawingCategoryAudit(HomeBuilderDrawingCategoryAuditDTO query);

    /**
     * 报馆ID和图纸来源查询图纸分类.
     *
     * @param reportId      the report id
     * @param drawingSource the drawing source
     * @return the list
     */
    List<HomeBuilderDrawingCategoryAudit> listByReportIdAndSource(Long reportId, HomeBuilderDrawingCategoryAuditDrawingSourceEnum drawingSource);

    /**
     * id 查询详情.
     *
     * @param id the id
     * @return the vo by id
     */
    HomeBuilderDrawingCategoryAuditVO getVOById(Long id);

    /**
     * 是否全部审核通过.
     *
     * @param list the list
     * @return the boolean
     */
    boolean isBuilderReportSpaceAllApproved(List<HomeBuilderDrawingCategoryAudit> list);

    /**
     * 保存图纸分类审核.
     *
     * @param auditDTO the audit dto
     * @return the boolean
     */
    boolean saveHomeBuilderDrawingCategoryAudit(HomeBuilderDrawingCategoryAuditDTO auditDTO);

    /**
     * 批量保存图纸分类审核.
     *
     * @param list the list
     * @return the boolean
     */
    boolean saveBatch(List<HomeBuilderDrawingCategoryAuditDTO> list);

    /**
     * 搭建商报馆提交图纸.
     *
     * @param list the list
     * @return the boolean
     */
    boolean submitBatchForBuilder(List<HomeBuilderDrawingCategoryAuditDTO> list);

    /**
     * 重新提交搭建商报馆图纸.
     *
     * @param list     the list
     * @param existHomeBuilderDrawingCategoryAuditList  the now list
     * @param reportId the report id
     * @return the boolean
     */
    boolean resubmitBatchForBuilder(List<HomeBuilderDrawingCategoryAuditDTO> list, List<HomeBuilderDrawingCategoryAudit> existHomeBuilderDrawingCategoryAuditList, Long reportId);

    /**
     * Save and remove batch boolean.
     *
     * @param list     the list
     * @param reportId the report id
     * @return the boolean
     */
    boolean reSaveBatch(List<HomeBuilderDrawingCategoryAuditDTO> list, Long reportId);

    /**
     * 主场一键报馆生成主场搭建商图纸分类审核记录.
     *
     * @param venueDrawingCategoryAuditDTO the venue drawing category audit dto
     * @return the boolean
     */
    boolean saveByVenueDrawingCategoryAudit(VenueDrawingCategoryAuditDTO venueDrawingCategoryAuditDTO);

    /**
     * 审核图纸分类.
     *
     * @param auditDTO the audit dto
     * @return the boolean
     */
    boolean updateAuditStatus(HomeBuilderDrawingCategoryAuditDTO auditDTO);

    /**
     * 批量审核.
     *
     * @param auditDTOList the audit dto list
     * @return the boolean
     */
    boolean updateBatchAuditStatus(List<HomeBuilderDrawingCategoryAuditDTO> auditDTOList);

    /**
     * 报馆ID删除图纸分类审核.
     *
     * @param reportId      the report id
     * @param drawingSource the drawing source
     * @return the boolean
     */
    boolean removeByReportIdAndSource(Long reportId, HomeBuilderDrawingCategoryAuditDrawingSourceEnum drawingSource);

    /**
     * 报馆ID，图纸类型ID批量删除图纸分类.
     *
     * @param reportId      the report id
     * @param drawingIdList the drawing id list
     * @return the boolean
     */
    boolean removeByReportIdAndDrawingId(Long reportId, List<Long> drawingIdList);
}
